package com.invengo.module_check.ui.fragment.opeartion.item;

import androidx.annotation.NonNull;

import com.invengo.module_check.ui.fragment.opeartion.OpeartionInfoViewModel;

import me.goldze.mvvmhabit.base.ItemViewModel;
import me.goldze.mvvmhabit.bus.event.SingleLiveEvent;

public class OpShelfInfoItemViewModel extends ItemViewModel<OpeartionInfoViewModel> {

    public SingleLiveEvent<String> name =new SingleLiveEvent<>();
    public SingleLiveEvent<Integer> count =new SingleLiveEvent<>();
    public OpShelfInfoItemViewModel(@NonNull OpeartionInfoViewModel viewModel, String name,int count ) {
        super(viewModel);
       this.name.postValue(name);
       this.count.postValue(count);
    }

    public int getPosition() {
        return viewModel.getPosition(this) + 1;
    }
}
